$(function () {
    mainchats1()
})

function mainchats1() {
    var chartDom = document.getElementById('mainCharts');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        tooltip: {
            trigger: 'item',
            showDelay: 20,
            transitionDuration: 0.4
        },
        color: ['aqua', 'red'],
        legend: {
            top: '5%',
            left: 'center',


            orient: 'vertical',
            textStyle: {
                color: "#fff",
            },
        },

        series: [
            {
                name: '',
                type: 'pie',
                radius: ['40%', '60%'],

                label: {
                    show: false,
                    position: 'center'
                },

                labelLine: {
                    show: false
                },
                data: [
                    { value: 1048, name: '已处理' },
                    { value: 70, name: '未处理' }
                ]
            }
        ]
    };

    option && myChart.setOption(option);
    mainchats2();
}

function mainchats2() {
    var chartDom = document.getElementById('mainCharts2');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        tooltip: {
            trigger: 'item',
            showDelay: 20,
            transitionDuration: 0.4
        },
        color: ['aqua', 'red'],
        legend: {
            top: '5%',
            left: 'center',


            orient: 'vertical',
            textStyle: {
                color: "#fff",
            },
        },

        series: [
            {
                name: '',
                type: 'pie',
                radius: ['40%', '60%'],

                label: {
                    show: false,
                    position: 'center'
                },

                labelLine: {
                    show: false
                },
                data: [
                    { value: 1048, name: '已处理' },
                    { value: 70, name: '今日报警' }
                ]
            }
        ]
    };

    option && myChart.setOption(option);
}